package test1.practice;

import java.util.Random;
import java.util.Scanner;

public class practice1 {
    public static void main(String[] args) {
        int[] arr=new int[10];
        Random r=new Random(10);
        Scanner sc=new Scanner(System.in);

        for (int i = 0; i < arr.length; i++) {
            int number= r.nextInt(100)+1;
            arr[i]=number;
        }
        int sum=0;
        for (int i = 0; i < arr.length; i++) {
            sum=sum+arr[i];
        }
        System.out.println("元素的和为："+sum);
        int avg=sum/arr.length;
        System.out.println("平均数的和为："+avg);
        int count=0;
        for (int i = 0; i < arr.length; i++) {
            if (avg>arr[i]){
                count++;
            }
        }
        System.out.println(count);
        for (int i = 0; i < arr.length; i++) {
            System.out.print(arr[i]+" ");
        }
    }
}
